const pkg = require('./package')
const webpack = require('webpack')

module.exports = {
  mode: 'spa',
  /*
  ** Headers of the page
  */
  head: {
    title: "方案书",
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: pkg.description }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },

  /*
  ** Customize the progress-bar color
  */
  loading: { color: '#fff' },

  /*
  ** Global CSS
  */
  css: [
  ],

  /*
  ** Plugins to load before mounting the App
  */

  plugins: [
    '~/plugins/http'
  ],
  /*
  ** Nuxt.js modules
  */
  modules: [
    // Doc: https://github.com/nuxt-community/axios-module#usage
    '@nuxtjs/axios'
  ],
  /*
  ** Axios module configuration
  */
  axios: {
    // See https://github.com/nuxt-community/axios-module#options
  },
  server: {
    port: 8460, // default: 3000
    host: 'http://huanlejiam.xhtol.com', // default: localhost,
  },
  /*
  ** Build configuration
  */
  build: {
    /*
    ** You can extend webpack config here
    */
    extend(config, ctx) {

    },
    postcss: [
      require('autoprefixer')({
        browsers: ['last 2 versions']
      }),
      require('postcss-px2rem')({
        remUnit: 100
      })
    ],
    plugins: [
      // new webpack.ProvidePlugin({
      //   '$': 'jquery',
      //   'fullpage': 'fullpage.js'
      // })
    ]


  }
}
